//
//  HBEvenManager.m
//  HeartBeat
//
//  Created by karong on 2023/9/20.
//

#import "HBEvenManager.h"
#import "Firebase.h"
@implementation HBEvenManager
+ (void)event:(NSString *)eventId evenLogType:(HBEvenLogType)evenLogType {
    [self event:eventId evenLogType:evenLogType attributes:@{}];
}

+ (void)event:(NSString *)eventId evenLogType:(HBEvenLogType)evenLogType attributes:(NSDictionary *)attributes {
    NSMutableDictionary * mutDic = [[NSMutableDictionary alloc]init];
    mutDic[@"evenType"] = @[@"Click", @"Show", @"Pop"][evenLogType];
    mutDic[@"language"] = SF(@"%ld", (long)appConfig.languageType);
    [mutDic addEntriesFromDictionary:attributes];
    [FIRAnalytics logEventWithName:eventId  parameters:mutDic];
}


@end
